The MENU ADD statements provide for an ItemState& parameter. For popup menus, this may be either %MFS_ENABLED or %MFS_DISABLED. For menu items, the state may be one of %MFS_ENABLED, %MFS_DISABLED, %MFS_CHECKED, %MFS_UNCHECKED, or %MFS_GRAYED.
A DDT menu requires the parent DDT dialog to contain at least one child control for the menu to operate correctly. This control may be a BUTTON or LABEL, etc, and the control may be located out of the visible client area of the dialog if necessary.
The Dessert Menu
In addition to creating menus dynamically, DDT provides a rich set of additional menu functions to allow you to manipulate your menus at run-time. The following is a brief summary of these functions:
Delete (remove) a menu item from a menu, or a popup menu from a menu bar. |
|
Redraw the menu bar for a given menu. This must be used if a menu is changed at run-time, regardless of whether the menu is visible or not. |
|
Obtain the current state of a menu item (%MF_ENABLED, etc). If the menu item is a separator, the returned value will be %MF_SEPARATOR. |
|
Retrieve the text for a given menu item. |
|
Set the current state of a menu item. |
|
Change the text of a specific menu item, and can be used to change the command accelerator of the item. |
For a more comprehensive list of menu statements and functions, See the Command Summary for DDT. |
See Also